package com.huilian.iotbox.client.dao;

import com.huilian.iotbox.data.common.ServerResponse;
import com.huilian.iotbox.data.dto.ConsumeRecordDto;
import com.huilian.iotbox.data.dto.OrderDto;
import com.huilian.iotbox.data.po.Order;
import com.huilian.iotbox.data.vo.OrderMiniVo;
import com.huilian.iotbox.data.vo.OrderVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * @author 谢洛涛
 * @date 2021/1/9 12:22
 */
@Mapper
public interface OrderDao {

    Integer add(OrderDto orderDto);

    Order findByOutTradeNoAndTotalAmount(@Param("outTradeNo") String outTradeNo, @Param("totalAmount") BigDecimal totalAmount);

    Integer updateOrder(Order order);

    OrderDto getById(Long orderId);

    Order findById(Long orderId);


    Integer updateStatusById(Order order);

    Order findOldOrder(Long orderId);

    int updateShoutStatus(Order order);

    OrderVo findOrderByPayNo(String payNo,String deviceNo);
}
